home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / osi / isode / vmsisode / vmsgcc139_tar.Z / vmsgcc139_tar / include / xab.h < prev   
Encoding:
C/C++ Source or Header  |  1991-12-18  |  14.0 KB  |  411 lines

  1. /*    XABALL -- Allocation Controll Extended Attribute block Definitions    */
  2.  
  3. struct    XABALL    {
  4.        unsigned char    xab$b_cod;
  5. #define            XAB$C_ALL    20        /* XABALL type code */
  6.  
  7.        unsigned char    xab$b_bln;
  8. #define            XAB$C_ALLLEN    0x20        /* XABALL block length (32 bytes) */
  9. #define            XAB$K_ALLLEN    0x20
  10.  
  11.         unsigned    : 16;            /* spare */
  12.  
  13.         char    *xab$l_nxt;            /* Next XAB in chain */
  14.  
  15.        unsigned char    xab$b_aop;            /* allocation options */
  16. #define            XAB$V_HRD    0        /* fail if requestd alignmt cannot be performed */
  17. #define            XAB$M_HRD    (1 << XAB$V_HRD)
  18. #define            XAB$V_ONC    1        /* locate space on cylinder boundary */
  19. #define            XAB$M_ONC    (1 << XAB$V_ONC)
  20. #define            XAB$V_CBT    5        /* contiguous allocation, best try */
  21. #define            XAB$M_CBT    (1 << XAB$V_CBT)
  22. #define            XAB$V_CTG    7        /* contiguous allocation */
  23. #define            XAB$M_CTG    (1 << XAB$V_CTG)
  24.  
  25.        unsigned char    xab$b_aln;            /* alignment boundary type */
  26. #define            XAB$C_ANY    0        /* any type of allocation */
  27. #define            XAB$C_CYL    1        /* alignment starts at cylinder boundary */
  28. #define            XAB$C_LBN    2        /* allocate at specified logical block number */
  29. #define            XAB$C_VBN    3        /* allocate near specified virtual block number */
  30. #define            XAB$C_RFI    4        /* allocate near related file */
  31.  
  32.        unsigned short    xab$w_vol;            /* relative volume number */
  33.        unsigned long    xab$l_loc;            /* allocation location */
  34.        unsigned long    xab$l_alq;            /* allocation quantity */
  35.        unsigned short    xab$w_deq;            /* default extension quantity */
  36.        unsigned char    xab$b_bkz;            /* bucket size used with the relative and indexed files */
  37.        unsigned char    xab$b_aid;            /* area identification number */
  38.  
  39.                             /* related file identification */
  40.        unsigned short    xab$w_rfi0;            /* file number */
  41. #define            xab$w_rfi    xab$w_rfi0
  42.  
  43.        unsigned short    xab$w_rfi2;            /* seq number */
  44.        unsigned short    xab$w_rfi4;            /* rev number */
  45.  
  46.         unsigned    : 16;            /* spare */
  47.         };
  48.  
  49.  
  50. extern int cc$rms_xaball();
  51. #define cc$rms_xaball (*(struct XABALL *) cc$rms_xaball)
  52. /* globalref struct XABALL cc$rms_xaball;  /* Declare initialized prototype data structures */
  53.  
  54.  
  55. /*  struct representing a 64-bit binary value expressing the date and time */
  56.  
  57. #define XAB_DATE_TIME    { unsigned    : 32; unsigned    : 32; }
  58.  
  59.  
  60. /*    XABDAT -- Date and Time Extended Attribute Block Definitions    */
  61.  
  62. struct    XABDAT    {
  63.        unsigned char    xab$b_cod;
  64. #define            XAB$C_DAT    18    /* XABDAT type code */
  65.  
  66.        unsigned char    xab$b_bln;
  67. #define            XAB$C_DATLEN    0x2C    /* XABDAT block length constant - V3 (44 bytes) */
  68. #define            XAB$K_DATLEN    0x2C
  69. #define            XAB$C_DATLEN_V2 0x24    /* XABDAT block length constant - V2 */
  70. #define            XAB$K_DATLEN_V2 0x24
  71.  
  72.         unsigned    : 16;        /* spare */
  73.  
  74.         char    *xab$l_nxt;        /* Next XAB in chain */
  75.        unsigned short    xab$w_rvn;        /* revision number */
  76.  
  77.         unsigned    : 16;        /* spare */
  78.  
  79.    struct XAB_DATE_TIME xab$q_rdt;        /* revision date and time */
  80.    struct XAB_DATE_TIME xab$q_cdt;        /* creation date and time */
  81.    struct XAB_DATE_TIME xab$q_edt;        /* expiration date and time */
  82.    struct XAB_DATE_TIME xab$q_bdt;        /* backup date and time */
  83.         };
  84.  
  85.  
  86. extern int cc$rms_xabdat();
  87. #define cc$rms_xabdat (* (struct XABDAT *) cc$rms_xabdat)
  88. /* globalref struct XABDAT cc$rms_xabdat;  /* Declare initialized prototype data structures */
  89.  
  90.  
  91. /*    XABFHC -- File Header Characteristics Extended Attribute Block Definitions    */
  92.  
  93. struct    XABFHC    {
  94.        unsigned char    xab$b_cod;
  95. #define            XAB$C_FHC    29    /* XABFHC type code */
  96.  
  97.        unsigned char    xab$b_bln;
  98. #define            XAB$C_FHCLEN    0x2C    /* XABFHC block length (44 bytes) */
  99. #define            XAB$K_FHCLEN    0x2C
  100.  
  101.         unsigned    : 16;        /* spare */
  102.  
  103.         char    *xab$l_nxt;        /* Next XAB in chain */
  104.        unsigned char    xab$b_rfo;        /* record format and file organization */
  105.        unsigned char    xab$b_atr;        /* record attributes */
  106.        unsigned short    xab$w_lrl;        /* longest record's length */
  107.        unsigned long    xab$l_hbk;        /* high virtual block in the file */
  108.        unsigned long    xab$l_ebk;        /* end-of-file block */
  109.        unsigned short    xab$w_ffb;        /* first free byte in end-of-file block */
  110.        unsigned char    xab$b_bkz;        /* bucket size */
  111.        unsigned char    xab$b_hsz;        /* fixed length control header size */
  112.        unsigned short    xab$w_mrz;        /* maximun record size */
  113.        unsigned short    xab$w_dxq;        /* default file extension quantity */
  114.        unsigned short    xab$w_gbc;        /* default global buffer count */
  115.  
  116.         unsigned    : 32;        /* spare */
  117.         unsigned    : 32;        /* spare */
  118.  
  119.        unsigned short    xab$w_verlimit;        /* version limit for the file */
  120.        unsigned long    xab$l_sbn;        /* starting logical block number if contiguous */
  121.         };
  122.  
  123.  
  124. extern int cc$rms_xabfhc();
  125. #define cc$rms_xabfhc (* (struct XABFHC *) cc$rms_xabfhc)
  126. /* globalref struct XABFHC cc$rms_xabfhc;  /* Declare initialized prototype data structures */
  127.  
  128.  
  129. /*    XABKEY -- Key Definition Extended Attribute Block Definitions    */
  130.  
  131. struct    XABKEY    {
  132.        unsigned char    xab$b_cod;
  133. #define            XAB$C_KEY    21        /* XABKEY type code */
  134.  
  135.        unsigned char    xab$b_bln;
  136. #define            XAB$C_KEYLEN    0x64        /* XABKEY block length (100 bytes) */
  137. #define            XAB$K_KEYLEN    0x64
  138. #define            XAB$C_KEYLEN_V3    0x4C        /* XABKEY block length (76 bytes) */
  139. #define            XAB$K_KEYLEN_V3    0x4C
  140. #define            XAB$C_KEYLEN_V2 0x40
  141. #define            XAB$K_KEYLEN_V2 0x40
  142.  
  143.         unsigned    : 16;            /* spare */
  144.  
  145.         char    *xab$l_nxt;            /* Next XAB address in chain */
  146.        unsigned char    xab$b_ian;            /* index level area number */
  147.        unsigned char    xab$b_lan;            /* lowest level of index area number */
  148.        unsigned char    xab$b_dan;            /* data bucket area number */
  149.        unsigned char    xab$b_lvl;            /* level of root bucket */
  150.        unsigned char    xab$b_ibs;            /* index bucket size in virtual blocks */
  151.        unsigned char    xab$b_dbs;            /* data bucket size in virtual blocks */
  152.        unsigned long    xab$l_rvb;            /* root bucket start virtual block number */
  153.  
  154.       unsigned char xab$b_flg;                /* key option flag byte */
  155. #define            XAB$V_DUP    0            /* duplicate key value allowed */
  156. #define            XAB$M_DUP    (1 << XAB$V_DUP)
  157. #define            XAB$V_CHG    1            /* may change on update (alternate keys only) */
  158. #define            XAB$M_CHG    (1 << XAB$V_CHG)
  159. #define            XAB$V_NUL    2            /* null key value enable (alternate keys only) */
  160. #define            XAB$M_NUL    (1 << XAB$V_NUL)
  161. #define            XAB$V_IDX_NCMPR 3            /* indicates index records are not compressed */
  162. #define            XAB$M_IDX_NCMPR (1 << XAB$V_IDX_NCMPR)
  163. #define            XAB$V_KEY_NCMPR 6            /* indicates primary key is not compressed */
  164. #define            XAB$M_KEY_NCMPR (1 << XAB$V_KEY_NCMPR)
  165. #define            XAB$V_DAT_NCMPR 7            /* indicated data record is not compressed */
  166. #define            XAB$M_DAT_NCMPR (1 << XAB$V_DAT_NCMPR)
  167.  
  168.        unsigned char    xab$b_dtp;            /* key field data type */
  169. #define            XAB$C_STG    0        /* left-justified string of unsigned bytes */
  170. #define            XAB$C_IN2    1        /* signed 15 bit integer (2 bytes) */
  171. #define            XAB$C_BN2    2        /* unsigned 2-byte binary */
  172. #define            XAB$C_IN4    3        /* signed 31 bit integer (4 bytes) */
  173. #define            XAB$C_BN4    4        /* unsigned 4-byte binary */
  174. #define            XAB$C_PAC    5        /* packed decimal string (1-16 bytes) */
  175. #define            XAB$C_IN8    6        /* signed 63 bit integer */
  176. #define            XAB$C_BN8    7        /* 8 byte binary */
  177. #define            XAB$C_MAXDTP    7        /* maximun legal data type */
  178.  
  179.        unsigned char    xab$b_nsg;            /* number of key segments */
  180.        unsigned char    xab$b_nul;            /* null key character value */
  181.        unsigned char    xab$b_tks;            /* total key field size (bytes) */
  182.        unsigned char    xab$b_ref;            /* key of reference (0=primary key, 1-254=alternate keys) */
  183.        unsigned short    xab$w_mrl;            /* minimun record length */
  184.        unsigned short    xab$w_ifl;            /* index bucket fill size (bytes) */
  185.        unsigned short    xab$w_dfl;            /* data bucket fill size (bytes) */
  186.  
  187.        unsigned short    xab$w_pos0;            /* key field record offset positions */
  188. #define            xab$w_pos    xab$w_pos0
  189.  
  190.        unsigned short    xab$w_pos1;
  191.        unsigned short    xab$w_pos2;
  192.        unsigned short    xab$w_pos3;
  193.        unsigned short    xab$w_pos4;
  194.        unsigned short    xab$w_pos5;
  195.        unsigned short    xab$w_pos6;
  196.        unsigned short    xab$w_pos7;
  197.  
  198.        unsigned char    xab$b_siz0;            /* key field segment sizes (bytes) */
  199. #define            xab$b_siz    xab$b_siz0
  200.  
  201.        unsigned char    xab$b_siz1;
  202.        unsigned char    xab$b_siz2;
  203.        unsigned char    xab$b_siz3;
  204.        unsigned char    xab$b_siz4;
  205.        unsigned char    xab$b_siz5;
  206.        unsigned char    xab$b_siz6;
  207.        unsigned char    xab$b_siz7;
  208.  
  209.         unsigned    : 16;            /* spare */
  210.  
  211.         char    *xab$l_knm;            /* key name buffer address */
  212.        unsigned long    xab$l_dvb;            /* first data bucket virtual block number */
  213.  
  214.        unsigned char    xab$b_typ0;            /* key field segment types */
  215. #define            xab$b_typ    xab$b_typ0
  216.  
  217.        unsigned char    xab$b_typ1;
  218.        unsigned char    xab$b_typ2;
  219.        unsigned char    xab$b_typ3;
  220.        unsigned char    xab$b_typ4;
  221.        unsigned char    xab$b_typ5;
  222.        unsigned char    xab$b_typ6;
  223.        unsigned char    xab$b_typ7;
  224.  
  225.        unsigned char    xab$b_prolog;            /* prologue level */
  226. #define            XAB$C_PRG1    1        /* prologue 1 */
  227. #define            XAB$C_PRG2    2        /* prologue 2 */
  228. #define            XAB$C_PRG3    3        /* prologue 3 */
  229.  
  230.         unsigned    : 24;            /* spare */
  231. /* the remaining fields were added at some point before VMS 5.3 */
  232.     unsigned int  XAB$L_COLTBL;        /*  address of collate table*/
  233.     unsigned int  XAB$L_COLSIZ;        /*  size of collate table */
  234.     unsigned int  XAB$L_COLNAM;        /*  name of collate table */
  235.     unsigned :32;
  236.     unsigned :32;
  237.     unsigned :32;
  238.         };
  239.  
  240.  
  241. extern int cc$rms_xabkey();
  242. #define cc$rms_xabkey (* (struct XABKEY *) cc$rms_xabkey)
  243. /* globalref struct XABKEY cc$rms_xabkey;  /* Declare initialized prototype data structures */
  244.  
  245. #define        XAB_PROT_FIELDS        { unsigned : 32; unsigned : 32; }
  246.  
  247. /*    XABPRO -- File Protection Extended Attribute Block Definitions    */
  248.  
  249. struct    XABPRO    {
  250.        unsigned char    xab$b_cod;
  251. #define            XAB$C_PRO    19    /* XABPRO type code */
  252.  
  253.        unsigned char    xab$b_bln;
  254. #define            XAB$C_PROLEN_V3 0x10    /* XABPRO block length (16 bytes) version 3.0 VMS */
  255. #define            XAB$K_PROLEN_V3 0x10
  256. #define            XAB$C_PROLEN    0x58    /* XABPRO block length (88 bytes) */
  257. #define            XAB$K_PROLEN    0x58
  258.  
  259.         unsigned    : 16;        /* spare */
  260.  
  261.         char    *xab$l_nxt;        /* Next XAB in chain */
  262.  
  263.      unsigned short xab$w_pro;                /* protection mask */
  264. #define            XAB$V_SYS    0            /* system */
  265. #define            XAB$S_SYS    4
  266. #define            XAB$V_OWN    4            /* owner */
  267. #define            XAB$S_OWN    4
  268. #define            XAB$V_GRP    8            /* group */
  269. #define            XAB$S_GRP    4
  270. #define            XAB$V_WLD    12            /* world */
  271. #define            XAB$S_WLD    4
  272. #define            XAB$V_NOREAD    0            /* deny read access */
  273. #define            XAB$M_NOREAD    (1 << XAB$V_NOREAD)
  274. #define            XAB$V_NOWRITE    1            /* deny write access */
  275. #define            XAB$M_NOWRITE    (1 << XAB$V_NOWRITE)
  276. #define            XAB$V_NOEXE    2            /* deny execution access */
  277. #define            XAB$M_NOEXE    (1 << XAB$V_NOEXE)
  278. #define            XAB$V_NODEL    3            /* deny delete access */
  279. #define            XAB$M_NODEL    (1 << XAB$V_NODEL)
  280.  
  281.        unsigned char    xab$b_mtacc;        /* magnetic tape accessibility */
  282.  
  283.        unsigned char    xab$b_prot_opt;        /* XABPRO options field */
  284. #define            XAB$V_PROPOGATE 0    /* propogate security attributes on $ENTER and $RENAME */
  285. #define            XAB$M_PROPOGATE (1 << XAB$V_PROPOGATE)
  286.  
  287.     unsigned long    xab$l_uic;        /* uic code */
  288.  
  289.  struct XAB_PROT_FIELDS xab$q_prot_mode;    /* RWED/mode protection for file */
  290.  
  291.         char    *xab$l_aclbuf;        /* address of users ACL buffer */
  292.        unsigned short    xab$w_aclsiz;        /* size of user's ACL buffer */
  293.        unsigned short    xab$w_acllen;        /* return lecngth of entire ACL */
  294.        unsigned long    xab$l_aclctx;        /* ACL context field */
  295.        unsigned long    xab$l_aclsts;        /* ACL return error status */
  296.  
  297.     unsigned    : 32;
  298.     unsigned    : 32;
  299.     unsigned    : 32;
  300.     unsigned    : 32;
  301.     unsigned    : 32;
  302.     unsigned    : 32;
  303.     unsigned    : 32;
  304.     unsigned    : 32;
  305.     unsigned    : 32;
  306.     unsigned    : 32;
  307.     unsigned    : 32;
  308.     unsigned    : 32;
  309.  
  310.         };
  311.  
  312. struct    {
  313.     unsigned    : 32;
  314.     unsigned    : 32;
  315.     unsigned    : 32;
  316.  
  317.     unsigned short    xab$w_mbm;        /* member number of file owner */
  318.     unsigned short    xab$w_grp;        /* group number of file owner */
  319.     unsigned char    xab$b_prot_mode;    /* first byte of protection mode field */
  320.  
  321.     };
  322.  
  323.  
  324. extern int cc$rms_xabpro();
  325. #define cc$rms_xabpro (* (struct XABPRO *) cc$rms_xabpro)
  326. /* globalref struct XABPRO cc$rms_xabpro;  /* Declare initialized prototype data structures */
  327.  
  328. #undef XAB_PROT_FIELDS
  329.  
  330.  
  331. /*    XABRDT -- Revision Date and Time Extended Attribute Block Definitions    */
  332.  
  333. struct    XABRDT    {
  334.        unsigned char    xab$b_cod;
  335. #define            XAB$C_RDT    30    /* XABRDT type code */
  336.  
  337.        unsigned char    xab$b_bln;
  338. #define            XAB$C_RDTLEN    0x14    /* XABRDT block length (20 bytes) */
  339. #define            XAB$K_RDTLEN    0x14
  340.  
  341.         unsigned    : 16;        /* spare */
  342.  
  343.         char    *xab$l_nxt;        /* Next XAB in chain */
  344.        unsigned short    xab$w_rvn;        /* revision number */
  345.  
  346.         unsigned    : 16;        /* spare */
  347.  
  348.    struct XAB_DATE_TIME xab$q_rdt;        /* revision date and time */
  349.         };
  350.  
  351.  
  352. extern int CC$RMS_XABRDT();
  353. #define cc$rms_xabrdt (* (struct XABRDT *) CC$RMS_XABRDT)
  354. /* globalref struct XABRDT cc$rms_xabrdt;  /* Declare initialized prototype data structures */
  355.  
  356.  
  357. #undef XAB_DATE_TIME
  358.  
  359. /*    XABSUM -- Summary Extended Attribute Block Definitions    */
  360.  
  361. struct    XABSUM    {
  362.        unsigned char    xab$b_cod;
  363. #define            XAB$C_SUM    22    /* XABSUM type code */
  364.  
  365.        unsigned char    xab$b_bln;
  366. #define            XAB$C_SUMLEN    0x0C    /* XABSUM block length (12 bytes) */
  367. #define            XAB$K_SUMLEN    0x0C
  368.  
  369.         unsigned    : 16;        /* spare */
  370.  
  371.         char    *xab$l_nxt;        /* Next XAB in chain */
  372.        unsigned char    xab$b_noa;        /* number of allocation areas defined for the file */
  373.        unsigned char    xab$b_nok;        /* number of keys defined for the file */
  374.        unsigned short    xab$w_pvn;        /* prologue version number */
  375.         };
  376.  
  377.  
  378. extern int CC$RMS_XABSUM();
  379. #define cc$rms_xabsum (* (struct XABSUM *) CC$RMS_XABSUM)
  380. /* globalref struct XABSUM cc$rms_xabsum;  /* Declare initialized prototype data structures */
  381.  
  382.  
  383. /* XABTRM - Terminal Control XAB field definitions */
  384.  
  385. struct XABTRM {
  386.  
  387.        unsigned char    xab$b_cod;
  388. #define            XAB$C_TRM    31    /* XABSUM type code */
  389.  
  390.        unsigned char    xab$b_bln;
  391. #define            XAB$C_TRMLEN    36    /* length of XABTRM block */
  392. #define            XAB$K_TRMLEN    36    /* length of XABTRM block */
  393.  
  394.         unsigned    : 16;        /* spare */
  395.  
  396.         char    *xab$l_nxt;        /* address of next block */
  397.         char    *xab$l_itmlst;        /* item list address */
  398.        unsigned short    xab$w_itmlst_len;    /* length of item list */
  399.  
  400.         unsigned    : 16;
  401.         unsigned    : 32;
  402.         unsigned    : 32;
  403.         unsigned    : 32;
  404.         unsigned    : 32;
  405.         unsigned    : 32;
  406.     };
  407.  
  408. extern int CC$RMS_XABTRM();
  409. #define cc$rms_xabtrm (* (struct XABTRM *) CC$RMS_XABTRM)
  410. /* globalref       struct XABTRM   cc$rms_xabtrm;  /* declare initialized prototype data structure */
  411.